html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background-color: rgba($color: #000000, $alpha: 0.5);
}
.container {
  margin: 100px auto;
  width: 300px;
  height: 150px;
  position: relative;
  .item {
    width: 400px;
    height: 200px;
    display: flex;
    justify-self: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.8s;
    box-shadow: 10px 10px 20px rgba($color: #000000, $alpha: 1);
    img {
      display: block;
      width: 100%;
      object-fit: contain;
    }
    @for $i from 1 through 4 {
      &:nth-child(#{$i}) {
        margin-top: #{$i * 100}px;
        transform: rotateX(45deg) rotateY(-15deg) rotate(45deg);
        opacity: 0.8;
        z-index: 5-$i;
        &.active {
          transform: rotateX(0) rotateY(0) rotate(0) translateY(150px) scale(2);
          z-index: 9;
          top: 50%;
          margin-top: -100px;
          opacity: 1;
        }
      }
    }
  }
}
